#include "musicplayer.h"

#include <QApplication>
#include <QSharedMemory>
#include <QMessageBox>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    QSharedMemory sharedMem("musicPlayer");
    if(sharedMem.attach())
    {
        QMessageBox::information(nullptr , "musicPlayer" , "程序已经打开~");
        return 0;
    }
    sharedMem.create(1);


    musicPlayer w;
    w.show();
    return a.exec();
}
